package com.niit.service.impl;

import java.util.List;

import com.niit.dao.BookDao;
import com.niit.model.Book;
import com.niit.service.BookService;

public class BookServiceImpl implements BookService{

	private BookDao dao = new BookDao();
	
	@Override
	public List<Book> queryBooks() {
		return dao.queryBooks();
	}

	@Override
	public Book getBookByCode(String code) {
		return dao.getBookByCode(code);
	}

	@Override
	public void addBook(Book book) {
		dao.addBook(book);
	}

	@Override
	public Book getBookById(Integer id) {
		return dao.getBookById(id);
	}

	@Override
	public void deleteBookById(Integer id) {
		dao.deleteBookById(id);
	}

	@Override
	public void updateBook(Book book) {
		dao.updateBook(book);
	}

	@Override
	public List<Book> queryBooksByCondition(Book book) {
		return dao.queryBooksByCondition(book);
	}

}
